package com.base.cn.platform.os.service.manage.order.count;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 订单统计接口
 *
 * @author s.li
 * @create 2018-08-24-9:50
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface OrderCountService extends BaseService {

    /**
     * 获取当天订单量
     * @param dateTime 时间
     * @return 统计数据对象
     */
    @RequestMapping(contextPath + "/order/queryOrderNowDayNum")
    List<Map<String,Integer>> queryOrderNowDayNum(@RequestParam("dateTime") String dateTime);

    /**
     * 查询购买课程的用户量
     * @return 用户量
     */
    @RequestMapping(contextPath + "/order/queryBuyCourseUserNum")
    Integer queryBuyCourseUserNum();

    /**
     * 查询订单总数
     * @return 订单总数量
     */
    @RequestMapping(contextPath + "/order/queryOrderCountNum")
    Integer queryOrderCountNum();

    /**
     * 查询订单流水总金额
     * @return 订单流水总金额
     */
    @RequestMapping(contextPath + "/order/queryOrderSumPrice")
    double queryOrderSumPrice();

    /**
     * 统计专业的销售额度的对比数据
     * @return List<OrderSubjectNum>
     */
    @RequestMapping(contextPath + "/order/orderSubjectNumList")
    List<Map<String,Object>> queryOrderSubjectPriceCountNum();

    /**
     * 查询统计订单价格区域的数据
     * @return OrderPriceCountNum
     */
    @RequestMapping(contextPath + "/order/queryOrderPriceCountNum")
    Map<String,Integer> queryOrderPriceCountNum();

    /**
     * 查询订单支付方式占比统计数据
     * @return OrderPayTypeCountNum
     */
    @RequestMapping(contextPath + "/order/queryOrderPayTypeCountNum")
    Map<String,Integer> queryOrderPayTypeCountNum();

    /**
     * 查询订单的来源数据统计
     * @return OrderFormCountNum
     */
    @RequestMapping(contextPath + "/order/queryOrderFormCountNum")
    Map<String,Integer> queryOrderFormCountNum();

    /**
     * 获取订单量
     * @param map 时间
     * @return 统计数据对象
     */
    @RequestMapping(contextPath + "/order/queryOrderDayNum")
    List<Map<String,Object>> queryOrderDayNum(@RequestBody Map<String, Object> map);
}
